// 组织架构请求
import request from '@/utils/request'

// 获取组织架构数据
export function getDepartments() {
  return request({
    url: '/company/department'
  })
}
  // 删除组织架构
  export function delDepartments(id){
   return  request({
     method:'delete',
     url:`/company/department/${id}`
   }) 
  }
  // 新增部门
  export function addDepartments(data) {
    return request({
      url: '/company/department',
      method: 'post',
      data
    })
  }
  //** *
//  * 获取部门详情

export function getDepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 编辑接口
export function updateDepartments (data){
  return request({
    method:'put',
    url:`/company/department/${data.id}`,
    data
  })
}